import static org.junit.Assert.*;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;

import org.junit.Test;
public class DS_JSONTest 
{

	@Test
	public void testSave_0()
	{
		List<Person> orig = new ArrayList<Person>();
		IDS ds = new DS_JSON("e:/test_0.json");
		ds.Save(orig);
		//assertEquals(orig, real);
	}

	@Test
	
	public void testLoad_0()
	{
		IDS ds = new DS_JSON("e:/test_orig_0.json");
		List<Person> real = ds.Load();
		//assertEquals(orig, real);
	}
	@Test
	public void test1() 
	{
		/*
		List<Person> orig = new ArrayList<Person>();
		orig.add( new Person(10,"ddd", "zzz", 25) );
		IDS ds = new DS_CSV("D:/cc.csv");
		ds.Save(orig);
		List<Person> real = ds.Load();
		assertEquals(orig, real);
		*/
	}

	@Test
public void testN() 
	{
		List<Person> orig = new ArrayList<Person>();
		orig.add( new Person(10,"ddd", "zzz", 25) );
		orig.add( new Person(10,"ddd", "zzz", 25) );
		orig.add( new Person(10,"ddd", "zzz", 25) );
		orig.add( new Person(10,"ddd", "zzz", 25) );
		orig.add( new Person(10,"ddd", "zzz", 25) );
		IDS ds = new DS_JSON("D:/cc.csv");
		ds.Save(orig);
		//List<Person> real = ds.Load();
		//assertEquals(orig, real);
	}
	@Test
	public void testLoad() 
	{
IDS fn = new DS_JSON("e:/test.json");
//fn.Save();
//List<Person> real = fn.Load();
//assertEquals(orig, real);
}

}
